package web.adminUI;

import java.util.List;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import ejb.dto.ReservationDTO;
import ejb.reservationManagement.ReservationMgr;


@ManagedBean
@SessionScoped
public class ClientReservationBean {
	
	
	@EJB
	private ReservationMgr reservationMgr;
	
	private int reservationId;
	private ReservationDTO reservation;
	
	public List<ReservationDTO> getAllReservations() {
		return reservationMgr.getAllReservationsDTO();
	}
	
	public void loadData() {
		this.reservation = reservationMgr.getReservationDTO(reservationId);
	}

	public int getReservationId() {
		return reservationId;
	}

	public void setReservationId(int reservationId) {
		this.reservationId = reservationId;
	}

	public ReservationDTO getReservation() {
		return reservation;
	}

	public void setReservation(ReservationDTO reservation) {
		this.reservation = reservation;
	}

}
